﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class TestController1
    {
        //private readonly Config config;
        private readonly IOptionsSnapshot<Proxy> optConfig;

        public TestController1(IOptionsSnapshot<Proxy> optConfig)
        {
            this.optConfig = optConfig;
        }

        public void Test()
        {
            Proxy cfg = optConfig.Value;
            Console.WriteLine($"{cfg.Address}");
            Console.WriteLine($"******************");
            Console.WriteLine($"{cfg.Port}");
        }
    }
}
